import getlink from "@/apis/request.js";

export default {
  state: {
      class:[],
      label:[]
  },
  mutations: {
    changeFenlei(state,payload){
      state.class = payload.class;
      state.label = payload.label;
    }
  },
  actions: {
    getFenlei(context,payload){
      getlink(payload.url)
      .then((ok) => {
        context.commit('changeFenlei',ok.data);
      })
      .catch((err) => {
          alert(err);
      });
    }
  },
  getters: {

  }
}
 